package com.ttg.common.enums;

import lombok.Getter;

/**
 * Description：
 * Author: chenyou
 * Date: 2025/11/4 12:00
 * Company: ttg
 * Copyright: Copyright (c) 2025
 */
@Getter
public enum RuleLIstEnum {
//    MERCH_QUALITY_WEIGHT(0,null,1,"商户质量维度权重分配"),
    MERCH_LIVENESS_DAY_RULE(0,3,2,"商户活跃天数阶梯评价规则"),
    MERCH_CLEAR_COST_RULE(0,1,3,"商户清算成本阶梯评价规则"),
    MERCH_AVG_RULE(0,2,4,"商户清算成本阶梯评价规则"),
//    MERCH_QUALITY_TYPE_RULE(0,null,5,"商户质量分类规则"),

//    INDUSTRY_QUALITY_WEIGHT(1,null,1,"行业质量维度权重分配"),
    INDUSTRY_LIVENESS_RULE(1,0,2,"行业活跃率阶梯评价规则"),
    INDUSTRY_CLEAR_COST_RULE(1,1,3,"行业清算成本阶梯评价规则"),
    INDUSTRY_AVG_RULE(1,2,4,"行业户均归集阶梯评价规则"),
//    INDUSTRY_QUALITY_TYPE_RULE(1,null,5,"行业质量分类规则"),
    ;


    private Integer dimType;
    private Integer ruleType;
    private Integer orderId;
    private String desc;



    RuleLIstEnum(Integer dimType, Integer ruleType, Integer orderId, String desc) {
        this.dimType = dimType;
        this.ruleType = ruleType;
        this.orderId = orderId;
        this.desc = desc;
    }

    public static RuleLIstEnum getByType(Integer dimType, Integer ruleType){
        for(RuleLIstEnum curr : RuleLIstEnum.values()){
            if(curr.getDimType().equals(dimType) && curr.getRuleType().equals(ruleType)){
                return curr;
            }
        }
        return null;
    }
}
